from socket import *

sk = socket(type=SOCK_DGRAM)
sk.bind(('192.168.14.96', 8080))
while 1:
    msg, addr = sk.recvfrom(1024)
    print(msg, addr)
    print(msg.decode('utf-8'))
    if msg.decode('utf - 8') == 'bye':
        sk.sendto(b'bye', addr)
        sk.close()
        break
    smsg = input('>>>').encode('utf - 8')
    sk.sendto(smsg, addr)

